#include "Protocol_HTTP.h"

CProtocol_HTTP::CProtocol_HTTP(void)
{
	name = "HTTP";
}

CProtocol_HTTP::~CProtocol_HTTP(void)
{
}

StackUtils::e_Status CProtocol_HTTP::Decode( CPacket& packet )
{
	packet.removeElements(0, name.size() + 2);
	packet.removeElements(packet.getBufferContent().size() - (name.size() + 2), name.size() + 2);
	return StackUtils::E_SUCCESS;
}

StackUtils::e_Status CProtocol_HTTP::Encode( CPacket& packet )
{
	packet.addFront("[HTTP]");
	packet.addBack("[HTTP]");
	return StackUtils::E_SUCCESS;
}
